﻿using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OptinMonitorTest
{
    public class SnapShortService
    {
        private readonly IOptionsSnapshot<MyOptions> optionsSnapshot;

        public SnapShortService(IOptionsSnapshot<MyOptions> optionsSnapshot) {

            this.optionsSnapshot = optionsSnapshot;
        }

        public void show()
        {
            Console.WriteLine("SnapShot:begin---");
            Console.WriteLine(optionsSnapshot.Value.ToString());
            Console.ReadKey();
            Console.WriteLine(optionsSnapshot.Value.ToString());
            Console.WriteLine("SnapShot:end----");
        }
       
    }
}
